package com.woniuxy.main.service.imp;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.woniuxy.main.mapper.Student_coachMapper;
import com.woniuxy.main.pojo.Student_coach;
import com.woniuxy.main.service.Student_coachService;

import lombok.Data;

@Service
@Transactional
@Data
public class Student_coachServiceImp implements Student_coachService {
	
	@Resource
	private Student_coachMapper student_coachMapper;
	
	@Override	//生成请求
	public int insertRequset(Student_coach student_coach) {
		return student_coachMapper.insertRequest(student_coach);
	}

	@Override	//检查用户是否已经发送过请求
	public Student_coach isSendRequest(int sid, int cid) {
		return student_coachMapper.isSendRequest(sid,cid);
	}

	@Override	//更新未处理请求发送时间
	public int updateRequest(Student_coach student_coach) {
		return student_coachMapper.updateRequest(student_coach);
	}

	@Override	//查询申请状态
	public String requestStatus(Student_coach student_coach) {
		return student_coachMapper.requestStatus(student_coach);
	}

	@Override	//取消申请
	public int deleteRequest(Student_coach student_coach) {
		return student_coachMapper.deleteRequest(student_coach);
	}
}
